<?php

/**
 * FinancialEvents.
 *
 * PHP version 8.3
 *
 * @category Class
 *
 * @author   OpenAPI Generator team
 *
 * @see     https://openapi-generator.tech
 */

/**
 * Selling Partner API for Finances.
 *
 * The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
 *
 * The version of the OpenAPI document: v0
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.9.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace SpApi\Model\finances\v0;

use SpApi\Model\ModelInterface;
use SpApi\ObjectSerializer;

/**
 * FinancialEvents Class Doc Comment.
 *
 * @category Class
 *
 * @description Contains all information related to a financial event.
 *
 * @author   OpenAPI Generator team
 *
 * @see     https://openapi-generator.tech
 *
 * @implements \ArrayAccess<string, mixed>
 */
class FinancialEvents implements ModelInterface, \ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
     * The original name of the model.
     */
    protected static string $openAPIModelName = 'FinancialEvents';

    /**
     * Array of property to type mappings. Used for (de)serialization.
     *
     * @var string[]
     */
    protected static array $openAPITypes = [
        'shipment_event_list' => '\SpApi\Model\finances\v0\ShipmentEvent[]',
        'shipment_settle_event_list' => '\SpApi\Model\finances\v0\ShipmentEvent[]',
        'refund_event_list' => '\SpApi\Model\finances\v0\ShipmentEvent[]',
        'guarantee_claim_event_list' => '\SpApi\Model\finances\v0\ShipmentEvent[]',
        'chargeback_event_list' => '\SpApi\Model\finances\v0\ShipmentEvent[]',
        'pay_with_amazon_event_list' => '\SpApi\Model\finances\v0\PayWithAmazonEvent[]',
        'service_provider_credit_event_list' => '\SpApi\Model\finances\v0\SolutionProviderCreditEvent[]',
        'retrocharge_event_list' => '\SpApi\Model\finances\v0\RetrochargeEvent[]',
        'rental_transaction_event_list' => '\SpApi\Model\finances\v0\RentalTransactionEvent[]',
        'product_ads_payment_event_list' => '\SpApi\Model\finances\v0\ProductAdsPaymentEvent[]',
        'service_fee_event_list' => '\SpApi\Model\finances\v0\ServiceFeeEvent[]',
        'seller_deal_payment_event_list' => '\SpApi\Model\finances\v0\SellerDealPaymentEvent[]',
        'debt_recovery_event_list' => '\SpApi\Model\finances\v0\DebtRecoveryEvent[]',
        'loan_servicing_event_list' => '\SpApi\Model\finances\v0\LoanServicingEvent[]',
        'adjustment_event_list' => '\SpApi\Model\finances\v0\AdjustmentEvent[]',
        'safet_reimbursement_event_list' => '\SpApi\Model\finances\v0\SAFETReimbursementEvent[]',
        'seller_review_enrollment_payment_event_list' => '\SpApi\Model\finances\v0\SellerReviewEnrollmentPaymentEvent[]',
        'fba_liquidation_event_list' => '\SpApi\Model\finances\v0\FBALiquidationEvent[]',
        'coupon_payment_event_list' => '\SpApi\Model\finances\v0\CouponPaymentEvent[]',
        'imaging_services_fee_event_list' => '\SpApi\Model\finances\v0\ImagingServicesFeeEvent[]',
        'network_commingling_transaction_event_list' => '\SpApi\Model\finances\v0\NetworkComminglingTransactionEvent[]',
        'affordability_expense_event_list' => '\SpApi\Model\finances\v0\AffordabilityExpenseEvent[]',
        'affordability_expense_reversal_event_list' => '\SpApi\Model\finances\v0\AffordabilityExpenseEvent[]',
        'removal_shipment_event_list' => '\SpApi\Model\finances\v0\RemovalShipmentEvent[]',
        'removal_shipment_adjustment_event_list' => '\SpApi\Model\finances\v0\RemovalShipmentAdjustmentEvent[]',
        'trial_shipment_event_list' => '\SpApi\Model\finances\v0\TrialShipmentEvent[]',
        'tds_reimbursement_event_list' => '\SpApi\Model\finances\v0\TDSReimbursementEvent[]',
        'adhoc_disbursement_event_list' => '\SpApi\Model\finances\v0\AdhocDisbursementEvent[]',
        'tax_withholding_event_list' => '\SpApi\Model\finances\v0\TaxWithholdingEvent[]',
        'charge_refund_event_list' => '\SpApi\Model\finances\v0\ChargeRefundEvent[]',
        'failed_adhoc_disbursement_event_list' => '\SpApi\Model\finances\v0\FailedAdhocDisbursementEvent[]',
        'value_added_service_charge_event_list' => '\SpApi\Model\finances\v0\ValueAddedServiceChargeEvent[]',
        'capacity_reservation_billing_event_list' => '\SpApi\Model\finances\v0\CapacityReservationBillingEvent[]'];

    /**
     * Array of property to format mappings. Used for (de)serialization.
     *
     * @var string[]
     *
     * @phpstan-var array<string, string|null>
     *
     * @psalm-var array<string, string|null>
     */
    protected static array $openAPIFormats = [
        'shipment_event_list' => null,
        'shipment_settle_event_list' => null,
        'refund_event_list' => null,
        'guarantee_claim_event_list' => null,
        'chargeback_event_list' => null,
        'pay_with_amazon_event_list' => null,
        'service_provider_credit_event_list' => null,
        'retrocharge_event_list' => null,
        'rental_transaction_event_list' => null,
        'product_ads_payment_event_list' => null,
        'service_fee_event_list' => null,
        'seller_deal_payment_event_list' => null,
        'debt_recovery_event_list' => null,
        'loan_servicing_event_list' => null,
        'adjustment_event_list' => null,
        'safet_reimbursement_event_list' => null,
        'seller_review_enrollment_payment_event_list' => null,
        'fba_liquidation_event_list' => null,
        'coupon_payment_event_list' => null,
        'imaging_services_fee_event_list' => null,
        'network_commingling_transaction_event_list' => null,
        'affordability_expense_event_list' => null,
        'affordability_expense_reversal_event_list' => null,
        'removal_shipment_event_list' => null,
        'removal_shipment_adjustment_event_list' => null,
        'trial_shipment_event_list' => null,
        'tds_reimbursement_event_list' => null,
        'adhoc_disbursement_event_list' => null,
        'tax_withholding_event_list' => null,
        'charge_refund_event_list' => null,
        'failed_adhoc_disbursement_event_list' => null,
        'value_added_service_charge_event_list' => null,
        'capacity_reservation_billing_event_list' => null];

    /**
     * Array of nullable properties. Used for (de)serialization.
     *
     * @var bool[]
     */
    protected static array $openAPINullables = [
        'shipment_event_list' => true,
        'shipment_settle_event_list' => true,
        'refund_event_list' => true,
        'guarantee_claim_event_list' => true,
        'chargeback_event_list' => true,
        'pay_with_amazon_event_list' => true,
        'service_provider_credit_event_list' => true,
        'retrocharge_event_list' => true,
        'rental_transaction_event_list' => true,
        'product_ads_payment_event_list' => true,
        'service_fee_event_list' => true,
        'seller_deal_payment_event_list' => true,
        'debt_recovery_event_list' => true,
        'loan_servicing_event_list' => true,
        'adjustment_event_list' => true,
        'safet_reimbursement_event_list' => true,
        'seller_review_enrollment_payment_event_list' => true,
        'fba_liquidation_event_list' => true,
        'coupon_payment_event_list' => true,
        'imaging_services_fee_event_list' => true,
        'network_commingling_transaction_event_list' => true,
        'affordability_expense_event_list' => true,
        'affordability_expense_reversal_event_list' => true,
        'removal_shipment_event_list' => true,
        'removal_shipment_adjustment_event_list' => true,
        'trial_shipment_event_list' => true,
        'tds_reimbursement_event_list' => true,
        'adhoc_disbursement_event_list' => true,
        'tax_withholding_event_list' => true,
        'charge_refund_event_list' => true,
        'failed_adhoc_disbursement_event_list' => true,
        'value_added_service_charge_event_list' => true,
        'capacity_reservation_billing_event_list' => true,
    ];

    /**
     * If a nullable field gets set to null, insert it here.
     *
     * @var bool[]
     */
    protected array $openAPINullablesSetToNull = [];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name.
     *
     * @var string[]
     */
    protected static array $attributeMap = [
        'shipment_event_list' => 'ShipmentEventList',
        'shipment_settle_event_list' => 'ShipmentSettleEventList',
        'refund_event_list' => 'RefundEventList',
        'guarantee_claim_event_list' => 'GuaranteeClaimEventList',
        'chargeback_event_list' => 'ChargebackEventList',
        'pay_with_amazon_event_list' => 'PayWithAmazonEventList',
        'service_provider_credit_event_list' => 'ServiceProviderCreditEventList',
        'retrocharge_event_list' => 'RetrochargeEventList',
        'rental_transaction_event_list' => 'RentalTransactionEventList',
        'product_ads_payment_event_list' => 'ProductAdsPaymentEventList',
        'service_fee_event_list' => 'ServiceFeeEventList',
        'seller_deal_payment_event_list' => 'SellerDealPaymentEventList',
        'debt_recovery_event_list' => 'DebtRecoveryEventList',
        'loan_servicing_event_list' => 'LoanServicingEventList',
        'adjustment_event_list' => 'AdjustmentEventList',
        'safet_reimbursement_event_list' => 'SAFETReimbursementEventList',
        'seller_review_enrollment_payment_event_list' => 'SellerReviewEnrollmentPaymentEventList',
        'fba_liquidation_event_list' => 'FBALiquidationEventList',
        'coupon_payment_event_list' => 'CouponPaymentEventList',
        'imaging_services_fee_event_list' => 'ImagingServicesFeeEventList',
        'network_commingling_transaction_event_list' => 'NetworkComminglingTransactionEventList',
        'affordability_expense_event_list' => 'AffordabilityExpenseEventList',
        'affordability_expense_reversal_event_list' => 'AffordabilityExpenseReversalEventList',
        'removal_shipment_event_list' => 'RemovalShipmentEventList',
        'removal_shipment_adjustment_event_list' => 'RemovalShipmentAdjustmentEventList',
        'trial_shipment_event_list' => 'TrialShipmentEventList',
        'tds_reimbursement_event_list' => 'TDSReimbursementEventList',
        'adhoc_disbursement_event_list' => 'AdhocDisbursementEventList',
        'tax_withholding_event_list' => 'TaxWithholdingEventList',
        'charge_refund_event_list' => 'ChargeRefundEventList',
        'failed_adhoc_disbursement_event_list' => 'FailedAdhocDisbursementEventList',
        'value_added_service_charge_event_list' => 'ValueAddedServiceChargeEventList',
        'capacity_reservation_billing_event_list' => 'CapacityReservationBillingEventList',
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses).
     *
     * @var string[]
     */
    protected static array $setters = [
        'shipment_event_list' => 'setShipmentEventList',
        'shipment_settle_event_list' => 'setShipmentSettleEventList',
        'refund_event_list' => 'setRefundEventList',
        'guarantee_claim_event_list' => 'setGuaranteeClaimEventList',
        'chargeback_event_list' => 'setChargebackEventList',
        'pay_with_amazon_event_list' => 'setPayWithAmazonEventList',
        'service_provider_credit_event_list' => 'setServiceProviderCreditEventList',
        'retrocharge_event_list' => 'setRetrochargeEventList',
        'rental_transaction_event_list' => 'setRentalTransactionEventList',
        'product_ads_payment_event_list' => 'setProductAdsPaymentEventList',
        'service_fee_event_list' => 'setServiceFeeEventList',
        'seller_deal_payment_event_list' => 'setSellerDealPaymentEventList',
        'debt_recovery_event_list' => 'setDebtRecoveryEventList',
        'loan_servicing_event_list' => 'setLoanServicingEventList',
        'adjustment_event_list' => 'setAdjustmentEventList',
        'safet_reimbursement_event_list' => 'setSafetReimbursementEventList',
        'seller_review_enrollment_payment_event_list' => 'setSellerReviewEnrollmentPaymentEventList',
        'fba_liquidation_event_list' => 'setFbaLiquidationEventList',
        'coupon_payment_event_list' => 'setCouponPaymentEventList',
        'imaging_services_fee_event_list' => 'setImagingServicesFeeEventList',
        'network_commingling_transaction_event_list' => 'setNetworkComminglingTransactionEventList',
        'affordability_expense_event_list' => 'setAffordabilityExpenseEventList',
        'affordability_expense_reversal_event_list' => 'setAffordabilityExpenseReversalEventList',
        'removal_shipment_event_list' => 'setRemovalShipmentEventList',
        'removal_shipment_adjustment_event_list' => 'setRemovalShipmentAdjustmentEventList',
        'trial_shipment_event_list' => 'setTrialShipmentEventList',
        'tds_reimbursement_event_list' => 'setTdsReimbursementEventList',
        'adhoc_disbursement_event_list' => 'setAdhocDisbursementEventList',
        'tax_withholding_event_list' => 'setTaxWithholdingEventList',
        'charge_refund_event_list' => 'setChargeRefundEventList',
        'failed_adhoc_disbursement_event_list' => 'setFailedAdhocDisbursementEventList',
        'value_added_service_charge_event_list' => 'setValueAddedServiceChargeEventList',
        'capacity_reservation_billing_event_list' => 'setCapacityReservationBillingEventList',
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests).
     *
     * @var string[]
     */
    protected static array $getters = [
        'shipment_event_list' => 'getShipmentEventList',
        'shipment_settle_event_list' => 'getShipmentSettleEventList',
        'refund_event_list' => 'getRefundEventList',
        'guarantee_claim_event_list' => 'getGuaranteeClaimEventList',
        'chargeback_event_list' => 'getChargebackEventList',
        'pay_with_amazon_event_list' => 'getPayWithAmazonEventList',
        'service_provider_credit_event_list' => 'getServiceProviderCreditEventList',
        'retrocharge_event_list' => 'getRetrochargeEventList',
        'rental_transaction_event_list' => 'getRentalTransactionEventList',
        'product_ads_payment_event_list' => 'getProductAdsPaymentEventList',
        'service_fee_event_list' => 'getServiceFeeEventList',
        'seller_deal_payment_event_list' => 'getSellerDealPaymentEventList',
        'debt_recovery_event_list' => 'getDebtRecoveryEventList',
        'loan_servicing_event_list' => 'getLoanServicingEventList',
        'adjustment_event_list' => 'getAdjustmentEventList',
        'safet_reimbursement_event_list' => 'getSafetReimbursementEventList',
        'seller_review_enrollment_payment_event_list' => 'getSellerReviewEnrollmentPaymentEventList',
        'fba_liquidation_event_list' => 'getFbaLiquidationEventList',
        'coupon_payment_event_list' => 'getCouponPaymentEventList',
        'imaging_services_fee_event_list' => 'getImagingServicesFeeEventList',
        'network_commingling_transaction_event_list' => 'getNetworkComminglingTransactionEventList',
        'affordability_expense_event_list' => 'getAffordabilityExpenseEventList',
        'affordability_expense_reversal_event_list' => 'getAffordabilityExpenseReversalEventList',
        'removal_shipment_event_list' => 'getRemovalShipmentEventList',
        'removal_shipment_adjustment_event_list' => 'getRemovalShipmentAdjustmentEventList',
        'trial_shipment_event_list' => 'getTrialShipmentEventList',
        'tds_reimbursement_event_list' => 'getTdsReimbursementEventList',
        'adhoc_disbursement_event_list' => 'getAdhocDisbursementEventList',
        'tax_withholding_event_list' => 'getTaxWithholdingEventList',
        'charge_refund_event_list' => 'getChargeRefundEventList',
        'failed_adhoc_disbursement_event_list' => 'getFailedAdhocDisbursementEventList',
        'value_added_service_charge_event_list' => 'getValueAddedServiceChargeEventList',
        'capacity_reservation_billing_event_list' => 'getCapacityReservationBillingEventList',
    ];

    /**
     * Associative array for storing property values.
     */
    protected array $container = [];

    /**
     * Constructor.
     *
     * @param null|array $data Associated array of property values
     *                         initializing the model
     */
    public function __construct(?array $data = null)
    {
        $this->setIfExists('shipment_event_list', $data ?? [], null);
        $this->setIfExists('shipment_settle_event_list', $data ?? [], null);
        $this->setIfExists('refund_event_list', $data ?? [], null);
        $this->setIfExists('guarantee_claim_event_list', $data ?? [], null);
        $this->setIfExists('chargeback_event_list', $data ?? [], null);
        $this->setIfExists('pay_with_amazon_event_list', $data ?? [], null);
        $this->setIfExists('service_provider_credit_event_list', $data ?? [], null);
        $this->setIfExists('retrocharge_event_list', $data ?? [], null);
        $this->setIfExists('rental_transaction_event_list', $data ?? [], null);
        $this->setIfExists('product_ads_payment_event_list', $data ?? [], null);
        $this->setIfExists('service_fee_event_list', $data ?? [], null);
        $this->setIfExists('seller_deal_payment_event_list', $data ?? [], null);
        $this->setIfExists('debt_recovery_event_list', $data ?? [], null);
        $this->setIfExists('loan_servicing_event_list', $data ?? [], null);
        $this->setIfExists('adjustment_event_list', $data ?? [], null);
        $this->setIfExists('safet_reimbursement_event_list', $data ?? [], null);
        $this->setIfExists('seller_review_enrollment_payment_event_list', $data ?? [], null);
        $this->setIfExists('fba_liquidation_event_list', $data ?? [], null);
        $this->setIfExists('coupon_payment_event_list', $data ?? [], null);
        $this->setIfExists('imaging_services_fee_event_list', $data ?? [], null);
        $this->setIfExists('network_commingling_transaction_event_list', $data ?? [], null);
        $this->setIfExists('affordability_expense_event_list', $data ?? [], null);
        $this->setIfExists('affordability_expense_reversal_event_list', $data ?? [], null);
        $this->setIfExists('removal_shipment_event_list', $data ?? [], null);
        $this->setIfExists('removal_shipment_adjustment_event_list', $data ?? [], null);
        $this->setIfExists('trial_shipment_event_list', $data ?? [], null);
        $this->setIfExists('tds_reimbursement_event_list', $data ?? [], null);
        $this->setIfExists('adhoc_disbursement_event_list', $data ?? [], null);
        $this->setIfExists('tax_withholding_event_list', $data ?? [], null);
        $this->setIfExists('charge_refund_event_list', $data ?? [], null);
        $this->setIfExists('failed_adhoc_disbursement_event_list', $data ?? [], null);
        $this->setIfExists('value_added_service_charge_event_list', $data ?? [], null);
        $this->setIfExists('capacity_reservation_billing_event_list', $data ?? [], null);
    }

    /**
     * Gets the string presentation of the object.
     *
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT
        );
    }

    /**
     * Array of property to type mappings. Used for (de)serialization.
     */
    public static function openAPITypes(): array
    {
        return self::$openAPITypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization.
     */
    public static function openAPIFormats(): array
    {
        return self::$openAPIFormats;
    }

    /**
     * Checks if a property is nullable.
     */
    public static function isNullable(string $property): bool
    {
        return self::openAPINullables()[$property] ?? false;
    }

    /**
     * Checks if a nullable property is set to null.
     */
    public function isNullableSetToNull(string $property): bool
    {
        return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name.
     */
    public static function attributeMap(): array
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses).
     */
    public static function setters(): array
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests).
     */
    public static function getters(): array
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     */
    public function getModelName(): string
    {
        return self::$openAPIModelName;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties(): array
    {
        return [];
    }

    /**
     * Validate all the properties in the model
     * return true if all passed.
     *
     * @return bool True if all properties are valid
     */
    public function valid(): bool
    {
        return 0 === count($this->listInvalidProperties());
    }

    /**
     * Gets shipment_event_list.
     */
    public function getShipmentEventList(): ?array
    {
        return $this->container['shipment_event_list'];
    }

    /**
     * Sets shipment_event_list.
     *
     * @param null|array $shipment_event_list a list of shipment event information
     */
    public function setShipmentEventList(?array $shipment_event_list): self
    {
        if (is_null($shipment_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'shipment_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('shipment_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['shipment_event_list'] = $shipment_event_list;

        return $this;
    }

    /**
     * Gets shipment_settle_event_list.
     */
    public function getShipmentSettleEventList(): ?array
    {
        return $this->container['shipment_settle_event_list'];
    }

    /**
     * Sets shipment_settle_event_list.
     *
     * @param null|array $shipment_settle_event_list a list of `ShipmentEvent` items
     */
    public function setShipmentSettleEventList(?array $shipment_settle_event_list): self
    {
        if (is_null($shipment_settle_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'shipment_settle_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('shipment_settle_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['shipment_settle_event_list'] = $shipment_settle_event_list;

        return $this;
    }

    /**
     * Gets refund_event_list.
     */
    public function getRefundEventList(): ?array
    {
        return $this->container['refund_event_list'];
    }

    /**
     * Sets refund_event_list.
     *
     * @param null|array $refund_event_list a list of shipment event information
     */
    public function setRefundEventList(?array $refund_event_list): self
    {
        if (is_null($refund_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'refund_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('refund_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['refund_event_list'] = $refund_event_list;

        return $this;
    }

    /**
     * Gets guarantee_claim_event_list.
     */
    public function getGuaranteeClaimEventList(): ?array
    {
        return $this->container['guarantee_claim_event_list'];
    }

    /**
     * Sets guarantee_claim_event_list.
     *
     * @param null|array $guarantee_claim_event_list a list of shipment event information
     */
    public function setGuaranteeClaimEventList(?array $guarantee_claim_event_list): self
    {
        if (is_null($guarantee_claim_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'guarantee_claim_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('guarantee_claim_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['guarantee_claim_event_list'] = $guarantee_claim_event_list;

        return $this;
    }

    /**
     * Gets chargeback_event_list.
     */
    public function getChargebackEventList(): ?array
    {
        return $this->container['chargeback_event_list'];
    }

    /**
     * Sets chargeback_event_list.
     *
     * @param null|array $chargeback_event_list a list of shipment event information
     */
    public function setChargebackEventList(?array $chargeback_event_list): self
    {
        if (is_null($chargeback_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'chargeback_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('chargeback_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['chargeback_event_list'] = $chargeback_event_list;

        return $this;
    }

    /**
     * Gets pay_with_amazon_event_list.
     */
    public function getPayWithAmazonEventList(): ?array
    {
        return $this->container['pay_with_amazon_event_list'];
    }

    /**
     * Sets pay_with_amazon_event_list.
     *
     * @param null|array $pay_with_amazon_event_list a list of events related to the seller's Pay with Amazon account
     */
    public function setPayWithAmazonEventList(?array $pay_with_amazon_event_list): self
    {
        if (is_null($pay_with_amazon_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'pay_with_amazon_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('pay_with_amazon_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['pay_with_amazon_event_list'] = $pay_with_amazon_event_list;

        return $this;
    }

    /**
     * Gets service_provider_credit_event_list.
     */
    public function getServiceProviderCreditEventList(): ?array
    {
        return $this->container['service_provider_credit_event_list'];
    }

    /**
     * Sets service_provider_credit_event_list.
     *
     * @param null|array $service_provider_credit_event_list a list of information about solution provider credits
     */
    public function setServiceProviderCreditEventList(?array $service_provider_credit_event_list): self
    {
        if (is_null($service_provider_credit_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'service_provider_credit_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('service_provider_credit_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['service_provider_credit_event_list'] = $service_provider_credit_event_list;

        return $this;
    }

    /**
     * Gets retrocharge_event_list.
     */
    public function getRetrochargeEventList(): ?array
    {
        return $this->container['retrocharge_event_list'];
    }

    /**
     * Sets retrocharge_event_list.
     *
     * @param null|array $retrocharge_event_list a list of information about Retrocharge or RetrochargeReversal events
     */
    public function setRetrochargeEventList(?array $retrocharge_event_list): self
    {
        if (is_null($retrocharge_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'retrocharge_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('retrocharge_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['retrocharge_event_list'] = $retrocharge_event_list;

        return $this;
    }

    /**
     * Gets rental_transaction_event_list.
     */
    public function getRentalTransactionEventList(): ?array
    {
        return $this->container['rental_transaction_event_list'];
    }

    /**
     * Sets rental_transaction_event_list.
     *
     * @param null|array $rental_transaction_event_list a list of rental transaction event information
     */
    public function setRentalTransactionEventList(?array $rental_transaction_event_list): self
    {
        if (is_null($rental_transaction_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'rental_transaction_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('rental_transaction_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['rental_transaction_event_list'] = $rental_transaction_event_list;

        return $this;
    }

    /**
     * Gets product_ads_payment_event_list.
     */
    public function getProductAdsPaymentEventList(): ?array
    {
        return $this->container['product_ads_payment_event_list'];
    }

    /**
     * Sets product_ads_payment_event_list.
     *
     * @param null|array $product_ads_payment_event_list a list of sponsored products payment events
     */
    public function setProductAdsPaymentEventList(?array $product_ads_payment_event_list): self
    {
        if (is_null($product_ads_payment_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'product_ads_payment_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('product_ads_payment_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['product_ads_payment_event_list'] = $product_ads_payment_event_list;

        return $this;
    }

    /**
     * Gets service_fee_event_list.
     */
    public function getServiceFeeEventList(): ?array
    {
        return $this->container['service_fee_event_list'];
    }

    /**
     * Sets service_fee_event_list.
     *
     * @param null|array $service_fee_event_list a list of information about service fee events
     */
    public function setServiceFeeEventList(?array $service_fee_event_list): self
    {
        if (is_null($service_fee_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'service_fee_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('service_fee_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['service_fee_event_list'] = $service_fee_event_list;

        return $this;
    }

    /**
     * Gets seller_deal_payment_event_list.
     */
    public function getSellerDealPaymentEventList(): ?array
    {
        return $this->container['seller_deal_payment_event_list'];
    }

    /**
     * Sets seller_deal_payment_event_list.
     *
     * @param null|array $seller_deal_payment_event_list a list of payment events for deal-related fees
     */
    public function setSellerDealPaymentEventList(?array $seller_deal_payment_event_list): self
    {
        if (is_null($seller_deal_payment_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'seller_deal_payment_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('seller_deal_payment_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['seller_deal_payment_event_list'] = $seller_deal_payment_event_list;

        return $this;
    }

    /**
     * Gets debt_recovery_event_list.
     */
    public function getDebtRecoveryEventList(): ?array
    {
        return $this->container['debt_recovery_event_list'];
    }

    /**
     * Sets debt_recovery_event_list.
     *
     * @param null|array $debt_recovery_event_list a list of debt recovery event information
     */
    public function setDebtRecoveryEventList(?array $debt_recovery_event_list): self
    {
        if (is_null($debt_recovery_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'debt_recovery_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('debt_recovery_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['debt_recovery_event_list'] = $debt_recovery_event_list;

        return $this;
    }

    /**
     * Gets loan_servicing_event_list.
     */
    public function getLoanServicingEventList(): ?array
    {
        return $this->container['loan_servicing_event_list'];
    }

    /**
     * Sets loan_servicing_event_list.
     *
     * @param null|array $loan_servicing_event_list a list of loan servicing events
     */
    public function setLoanServicingEventList(?array $loan_servicing_event_list): self
    {
        if (is_null($loan_servicing_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'loan_servicing_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('loan_servicing_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['loan_servicing_event_list'] = $loan_servicing_event_list;

        return $this;
    }

    /**
     * Gets adjustment_event_list.
     */
    public function getAdjustmentEventList(): ?array
    {
        return $this->container['adjustment_event_list'];
    }

    /**
     * Sets adjustment_event_list.
     *
     * @param null|array $adjustment_event_list a list of adjustment event information for the seller's account
     */
    public function setAdjustmentEventList(?array $adjustment_event_list): self
    {
        if (is_null($adjustment_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'adjustment_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('adjustment_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['adjustment_event_list'] = $adjustment_event_list;

        return $this;
    }

    /**
     * Gets safet_reimbursement_event_list.
     */
    public function getSafetReimbursementEventList(): ?array
    {
        return $this->container['safet_reimbursement_event_list'];
    }

    /**
     * Sets safet_reimbursement_event_list.
     *
     * @param null|array $safet_reimbursement_event_list a list of SAFETReimbursementEvents
     */
    public function setSafetReimbursementEventList(?array $safet_reimbursement_event_list): self
    {
        if (is_null($safet_reimbursement_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'safet_reimbursement_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('safet_reimbursement_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['safet_reimbursement_event_list'] = $safet_reimbursement_event_list;

        return $this;
    }

    /**
     * Gets seller_review_enrollment_payment_event_list.
     */
    public function getSellerReviewEnrollmentPaymentEventList(): ?array
    {
        return $this->container['seller_review_enrollment_payment_event_list'];
    }

    /**
     * Sets seller_review_enrollment_payment_event_list.
     *
     * @param null|array $seller_review_enrollment_payment_event_list a list of information about fee events for the Early Reviewer Program
     */
    public function setSellerReviewEnrollmentPaymentEventList(?array $seller_review_enrollment_payment_event_list): self
    {
        if (is_null($seller_review_enrollment_payment_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'seller_review_enrollment_payment_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('seller_review_enrollment_payment_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['seller_review_enrollment_payment_event_list'] = $seller_review_enrollment_payment_event_list;

        return $this;
    }

    /**
     * Gets fba_liquidation_event_list.
     */
    public function getFbaLiquidationEventList(): ?array
    {
        return $this->container['fba_liquidation_event_list'];
    }

    /**
     * Sets fba_liquidation_event_list.
     *
     * @param null|array $fba_liquidation_event_list a list of FBA inventory liquidation payment events
     */
    public function setFbaLiquidationEventList(?array $fba_liquidation_event_list): self
    {
        if (is_null($fba_liquidation_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'fba_liquidation_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('fba_liquidation_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['fba_liquidation_event_list'] = $fba_liquidation_event_list;

        return $this;
    }

    /**
     * Gets coupon_payment_event_list.
     */
    public function getCouponPaymentEventList(): ?array
    {
        return $this->container['coupon_payment_event_list'];
    }

    /**
     * Sets coupon_payment_event_list.
     *
     * @param null|array $coupon_payment_event_list a list of coupon payment event information
     */
    public function setCouponPaymentEventList(?array $coupon_payment_event_list): self
    {
        if (is_null($coupon_payment_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'coupon_payment_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('coupon_payment_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['coupon_payment_event_list'] = $coupon_payment_event_list;

        return $this;
    }

    /**
     * Gets imaging_services_fee_event_list.
     */
    public function getImagingServicesFeeEventList(): ?array
    {
        return $this->container['imaging_services_fee_event_list'];
    }

    /**
     * Sets imaging_services_fee_event_list.
     *
     * @param null|array $imaging_services_fee_event_list a list of fee events related to Amazon Imaging services
     */
    public function setImagingServicesFeeEventList(?array $imaging_services_fee_event_list): self
    {
        if (is_null($imaging_services_fee_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'imaging_services_fee_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('imaging_services_fee_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['imaging_services_fee_event_list'] = $imaging_services_fee_event_list;

        return $this;
    }

    /**
     * Gets network_commingling_transaction_event_list.
     */
    public function getNetworkComminglingTransactionEventList(): ?array
    {
        return $this->container['network_commingling_transaction_event_list'];
    }

    /**
     * Sets network_commingling_transaction_event_list.
     *
     * @param null|array $network_commingling_transaction_event_list a list of network commingling transaction events
     */
    public function setNetworkComminglingTransactionEventList(?array $network_commingling_transaction_event_list): self
    {
        if (is_null($network_commingling_transaction_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'network_commingling_transaction_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('network_commingling_transaction_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['network_commingling_transaction_event_list'] = $network_commingling_transaction_event_list;

        return $this;
    }

    /**
     * Gets affordability_expense_event_list.
     */
    public function getAffordabilityExpenseEventList(): ?array
    {
        return $this->container['affordability_expense_event_list'];
    }

    /**
     * Sets affordability_expense_event_list.
     *
     * @param null|array $affordability_expense_event_list a list of expense information related to an affordability promotion
     */
    public function setAffordabilityExpenseEventList(?array $affordability_expense_event_list): self
    {
        if (is_null($affordability_expense_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'affordability_expense_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('affordability_expense_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['affordability_expense_event_list'] = $affordability_expense_event_list;

        return $this;
    }

    /**
     * Gets affordability_expense_reversal_event_list.
     */
    public function getAffordabilityExpenseReversalEventList(): ?array
    {
        return $this->container['affordability_expense_reversal_event_list'];
    }

    /**
     * Sets affordability_expense_reversal_event_list.
     *
     * @param null|array $affordability_expense_reversal_event_list a list of expense information related to an affordability promotion
     */
    public function setAffordabilityExpenseReversalEventList(?array $affordability_expense_reversal_event_list): self
    {
        if (is_null($affordability_expense_reversal_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'affordability_expense_reversal_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('affordability_expense_reversal_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['affordability_expense_reversal_event_list'] = $affordability_expense_reversal_event_list;

        return $this;
    }

    /**
     * Gets removal_shipment_event_list.
     */
    public function getRemovalShipmentEventList(): ?array
    {
        return $this->container['removal_shipment_event_list'];
    }

    /**
     * Sets removal_shipment_event_list.
     *
     * @param null|array $removal_shipment_event_list a list of removal shipment event information
     */
    public function setRemovalShipmentEventList(?array $removal_shipment_event_list): self
    {
        if (is_null($removal_shipment_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'removal_shipment_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('removal_shipment_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['removal_shipment_event_list'] = $removal_shipment_event_list;

        return $this;
    }

    /**
     * Gets removal_shipment_adjustment_event_list.
     */
    public function getRemovalShipmentAdjustmentEventList(): ?array
    {
        return $this->container['removal_shipment_adjustment_event_list'];
    }

    /**
     * Sets removal_shipment_adjustment_event_list.
     *
     * @param null|array $removal_shipment_adjustment_event_list a comma-delimited list of Removal shipmentAdjustment details for FBA inventory
     */
    public function setRemovalShipmentAdjustmentEventList(?array $removal_shipment_adjustment_event_list): self
    {
        if (is_null($removal_shipment_adjustment_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'removal_shipment_adjustment_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('removal_shipment_adjustment_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['removal_shipment_adjustment_event_list'] = $removal_shipment_adjustment_event_list;

        return $this;
    }

    /**
     * Gets trial_shipment_event_list.
     */
    public function getTrialShipmentEventList(): ?array
    {
        return $this->container['trial_shipment_event_list'];
    }

    /**
     * Sets trial_shipment_event_list.
     *
     * @param null|array $trial_shipment_event_list a list of information about trial shipment financial events
     */
    public function setTrialShipmentEventList(?array $trial_shipment_event_list): self
    {
        if (is_null($trial_shipment_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'trial_shipment_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('trial_shipment_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['trial_shipment_event_list'] = $trial_shipment_event_list;

        return $this;
    }

    /**
     * Gets tds_reimbursement_event_list.
     */
    public function getTdsReimbursementEventList(): ?array
    {
        return $this->container['tds_reimbursement_event_list'];
    }

    /**
     * Sets tds_reimbursement_event_list.
     *
     * @param null|array $tds_reimbursement_event_list a list of `TDSReimbursementEvent` items
     */
    public function setTdsReimbursementEventList(?array $tds_reimbursement_event_list): self
    {
        if (is_null($tds_reimbursement_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'tds_reimbursement_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('tds_reimbursement_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['tds_reimbursement_event_list'] = $tds_reimbursement_event_list;

        return $this;
    }

    /**
     * Gets adhoc_disbursement_event_list.
     */
    public function getAdhocDisbursementEventList(): ?array
    {
        return $this->container['adhoc_disbursement_event_list'];
    }

    /**
     * Sets adhoc_disbursement_event_list.
     *
     * @param null|array $adhoc_disbursement_event_list a list of `AdhocDisbursement` events
     */
    public function setAdhocDisbursementEventList(?array $adhoc_disbursement_event_list): self
    {
        if (is_null($adhoc_disbursement_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'adhoc_disbursement_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('adhoc_disbursement_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['adhoc_disbursement_event_list'] = $adhoc_disbursement_event_list;

        return $this;
    }

    /**
     * Gets tax_withholding_event_list.
     */
    public function getTaxWithholdingEventList(): ?array
    {
        return $this->container['tax_withholding_event_list'];
    }

    /**
     * Sets tax_withholding_event_list.
     *
     * @param null|array $tax_withholding_event_list a list of `TaxWithholding` events
     */
    public function setTaxWithholdingEventList(?array $tax_withholding_event_list): self
    {
        if (is_null($tax_withholding_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'tax_withholding_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('tax_withholding_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['tax_withholding_event_list'] = $tax_withholding_event_list;

        return $this;
    }

    /**
     * Gets charge_refund_event_list.
     */
    public function getChargeRefundEventList(): ?array
    {
        return $this->container['charge_refund_event_list'];
    }

    /**
     * Sets charge_refund_event_list.
     *
     * @param null|array $charge_refund_event_list a list of charge refund events
     */
    public function setChargeRefundEventList(?array $charge_refund_event_list): self
    {
        if (is_null($charge_refund_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'charge_refund_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('charge_refund_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['charge_refund_event_list'] = $charge_refund_event_list;

        return $this;
    }

    /**
     * Gets failed_adhoc_disbursement_event_list.
     */
    public function getFailedAdhocDisbursementEventList(): ?array
    {
        return $this->container['failed_adhoc_disbursement_event_list'];
    }

    /**
     * Sets failed_adhoc_disbursement_event_list.
     *
     * @param null|array $failed_adhoc_disbursement_event_list a list of `FailedAdhocDisbursementEvent`s
     */
    public function setFailedAdhocDisbursementEventList(?array $failed_adhoc_disbursement_event_list): self
    {
        if (is_null($failed_adhoc_disbursement_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'failed_adhoc_disbursement_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('failed_adhoc_disbursement_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['failed_adhoc_disbursement_event_list'] = $failed_adhoc_disbursement_event_list;

        return $this;
    }

    /**
     * Gets value_added_service_charge_event_list.
     */
    public function getValueAddedServiceChargeEventList(): ?array
    {
        return $this->container['value_added_service_charge_event_list'];
    }

    /**
     * Sets value_added_service_charge_event_list.
     *
     * @param null|array $value_added_service_charge_event_list a list of `ValueAddedServiceCharge` events
     */
    public function setValueAddedServiceChargeEventList(?array $value_added_service_charge_event_list): self
    {
        if (is_null($value_added_service_charge_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'value_added_service_charge_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('value_added_service_charge_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['value_added_service_charge_event_list'] = $value_added_service_charge_event_list;

        return $this;
    }

    /**
     * Gets capacity_reservation_billing_event_list.
     */
    public function getCapacityReservationBillingEventList(): ?array
    {
        return $this->container['capacity_reservation_billing_event_list'];
    }

    /**
     * Sets capacity_reservation_billing_event_list.
     *
     * @param null|array $capacity_reservation_billing_event_list a list of `CapacityReservationBillingEvent` events
     */
    public function setCapacityReservationBillingEventList(?array $capacity_reservation_billing_event_list): self
    {
        if (is_null($capacity_reservation_billing_event_list)) {
            array_push($this->openAPINullablesSetToNull, 'capacity_reservation_billing_event_list');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('capacity_reservation_billing_event_list', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['capacity_reservation_billing_event_list'] = $capacity_reservation_billing_event_list;

        return $this;
    }

    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param int $offset Offset
     */
    public function offsetExists($offset): bool
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param int $offset Offset
     *
     * @return null|mixed
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset): mixed
    {
        return $this->container[$offset] ?? null;
    }

    /**
     * Sets value based on offset.
     *
     * @param null|int $offset Offset
     * @param mixed    $value  Value to be set
     */
    public function offsetSet($offset, mixed $value): void
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param int $offset Offset
     */
    public function offsetUnset($offset): void
    {
        unset($this->container[$offset]);
    }

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     *
     * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php
     *
     * @return mixed returns data which can be serialized by json_encode(), which is a value
     *               of any type other than a resource
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize(): mixed
    {
        return ObjectSerializer::sanitizeForSerialization($this);
    }

    /**
     * Gets a header-safe presentation of the object.
     */
    public function toHeaderValue(): string
    {
        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }

    /**
     * Array of nullable properties.
     */
    protected static function openAPINullables(): array
    {
        return self::$openAPINullables;
    }

    /**
     * Array of nullable field names deliberately set to null.
     *
     * @return bool[]
     */
    private function getOpenAPINullablesSetToNull(): array
    {
        return $this->openAPINullablesSetToNull;
    }

    /**
     * Setter - Array of nullable field names deliberately set to null.
     *
     * @param bool[] $openAPINullablesSetToNull
     */
    private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
    {
        $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
    }

    /**
     * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
     * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
     * $this->openAPINullablesSetToNull array.
     *
     * @param mixed $defaultValue
     */
    private function setIfExists(string $variableName, array $fields, $defaultValue): void
    {
        if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
            $this->openAPINullablesSetToNull[] = $variableName;
        }

        $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
    }
}
